import Ember from 'ember';

export default Ember.Component.extend({
  classNames: ['inline-div'],
  showMenus: Ember.computed(function() {
    return this.get('menus');
  }),
  showConfirm: false,
  actions: {
    menuClicked(mname) {
        if (mname === 'delete') {
          this.toggleProperty("showConfirm");
        } else {
          this.sendAction('action', mname);
        }
      },
      deleteConfirm(confirm) {
        if (confirm) {
          this.sendAction('action', 'delete');
        }
        this.toggleProperty("showConfirm");
      }
  }
});
